home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AniAnimateMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  9.0 KB  |  287 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  15 November 1995
  22. //  Author:         hmbw
  23. //
  24. //  Description:
  25. //      This implements the "Keys" menu on the main menubar.
  26. //
  27.  
  28.  
  29.  
  30. //  Procedure Name:
  31. //        KeyframeMenu
  32. //
  33. //  Description:
  34. //      Post the Keyframe menu in the main menubar
  35. //
  36. //  Input Arguments:
  37. //      The parent control for the menu.
  38. //
  39. //  Return Value:
  40. //      None.
  41. //
  42. global proc AniAnimateMenu ( string $parent ) {
  43.  
  44.     setParent -m $parent;
  45.  
  46.     // Set Key & Hold keys
  47.     //
  48.     menuItem -label "Set Key"
  49.             -command "SetKey"
  50.             -image "setKeyframe.xpm"                 
  51.             -annotation "Set Key: Select object(s) to key"
  52.             -dragMenuCommand "performSetKeyframeArgList 1 {\"2\", \"animationList\"}" setKeyItem;
  53.         menuItem -optionBox true
  54.             -annotation "Set Key Option Box"
  55.             -l "Set Key Option Box"
  56.             -image "setKeyframe.xpm"            
  57.             -command "SetKeyOptions" setKeyOptionItem;
  58.  
  59.     menuItem -label "Set Breakdown"
  60.             -command "SetBreakdownKey"
  61.             -annotation "Set Breakdown: Select object(s) for which to set a breakdown key (maintains a proportional relationship with adjacent keys)"
  62.             -dragMenuCommand "performSetBreakdown 2 animationList" setBreakdownItem;
  63.         menuItem -optionBox true
  64.             -annotation "Set Breakdown Option Box"
  65.             -l "Set Breakdown Option Box"
  66.             -command "SetBreakdownKeyOptions" setBreakdownOptionItem;
  67.  
  68.     menuItem -label "Hold Current Keys" -echoCommand true
  69.         -command "HoldCurrentKeys"
  70.         -annotation "Hold Current Keys: Select object(s) to set hold key"
  71.         holdKeyItem;
  72.  
  73.     // Set Driven Keyframe
  74.     //
  75.     menuItem -l "Set Driven Key" -subMenu true -aob true -to true;
  76.         menuItem -label "Set" -command "SetDrivenKey"
  77.             -annotation "Set Driven Key: Select driven object(s)"
  78.             setDrivenKeyItem;
  79.         menuItem -optionBox true
  80.             -annotation "Set Driven Key Option Box"
  81.             -l "Set Driven Key Option Box"
  82.             -command "SetDrivenKeyOptions" setDrivenKeyDialog;
  83.  
  84.         menuItem -divider true;
  85.  
  86.         menuItem -label "Go to Previous"
  87.             -command "GoToPreviousDrivenKey"
  88.             -annotation "Go to Previous Driven Key: Select driven object(s)"
  89.             previousDrivenKeyItem;
  90.  
  91.         menuItem -label "Go to Next"
  92.             -command "GoToNextDrivenKey"
  93.             -annotation "Go to Next Driven Key: Select driven object(s)"
  94.             nextDrivenKeyItem;        
  95.         
  96.         setParent -menu ..;
  97.  
  98.     // Set Transform Keyframe
  99.     //
  100.     menuItem -l "Set Transform Keys" -subMenu true -aob true -to true;
  101.         menuItem -label "Translate" -command "SetKeyTranslate"
  102.             -annotation "Set Key for Translate"
  103.             setTranslationKeyItem;
  104.  
  105.         menuItem -label "Rotate" -command "SetKeyRotate"
  106.             -annotation "Set Key for Rotate"
  107.             setRotationKeyItem;
  108.  
  109.         menuItem -label "Scale" -command "SetKeyScale"
  110.             -annotation "Set Key for Scale"
  111.             setScaleKeyItem;
  112.         
  113.         setParent -menu ..;
  114.  
  115.     // IK/FK Switching
  116.     //
  117.     menuItem -l "IK/FK Keys" -subMenu true -aob true -to true;
  118.         menuItem -label "Set IK/FK Key" 
  119.                 -annotation "Set keys on selected joint chains and handles."
  120.                 -command SetIKFKKeyframe
  121.                 ikFKSetKeyItem;
  122.  
  123.         int $ikState = `optionVar -q ikFKSwitchState`;
  124.         string $mi = `menuItem     -label "Enable IK Solver" 
  125.                     -checkBox $ikState
  126.                     -ann "Toggle the solver enable state for the current selection"
  127.                     -command ToggleFkIk ikFKStateItem`;
  128.             
  129.         menuItem -label "Connect to IK/FK" 
  130.                 -annotation "Select a node and a IK Handle."
  131.                 -command ConnectNodeToIKFK
  132.                 ikFKConnectToItem;
  133.  
  134.         menuItem -label "Move IK to FK"
  135.                 -annotation "Select an IK handle or IK/FK connected object."
  136.                 -command MoveIKtoFK
  137.                 moveIKtoFKitem;
  138.  
  139.         setUpIKSelectionScriptJob($mi);
  140.  
  141.         setParent -menu ..;
  142.  
  143.     menuItem -divider true;        
  144.     menuItem -label "Create Clip"
  145.         -annotation "Create Clip: Select character"
  146.         -command "CreateClip" 
  147.         -dragMenuCommand("performCreateClip 2")
  148.         createClipItem;
  149.     menuItem -optionBox true
  150.         -annotation "Create Clip Option Box"
  151.         -label "Create Clip Option Box"
  152.         -command ("CreateClipOptions") 
  153.         createClipOptionItem;
  154.  
  155.     menuItem -label "Create Pose"
  156.         -annotation "Create Pose: Select character"
  157.         -command "CreatePose" 
  158.         -dragMenuCommand("performCreatePose 2")
  159.         createPoseItem;
  160.     menuItem -optionBox true
  161.         -annotation "Create Pose Option Box"
  162.         -label "Create Pose Option Box"
  163.         -command ("CreatePoseOptions") 
  164.         createPoseOptionItem;
  165.  
  166.     menuItem -divider true;
  167.  
  168.     menuItem -label "Ghost Selected"
  169.         -annotation "Ghost Selected: Select object(s) to be ghosted."
  170.         -command "CreateGhost"
  171.         -image "ghost.xpm"
  172.         -dragMenuCommand("performGhost 2")
  173.         createGhostItem;
  174.     menuItem -optionBox true
  175.         -annotation "Create Ghost Option Box"
  176.         -label "Create Ghost Option Box"
  177.         -image "ghost.xpm"         
  178.         -command ("CreateGhostOptions")
  179.         createGhostOptionItem;
  180.  
  181.     menuItem -label "Unghost Selected"
  182.         -annotation "Unghost Selected: Select object(s) to be unghosted."
  183.         -command "DoUnghost"
  184.         -image "ghostOff.xpm"
  185.         -dragMenuCommand("performUnghost 2")
  186.         UnghostItem;
  187.     menuItem -optionBox true
  188.         -annotation "Unghost Option Box"
  189.         -label "Unghost Option Box"
  190.         -image "ghostOff.xpm"         
  191.         -command ("DoUnghostOptions")
  192.         unghostOptionItem;
  193.  
  194.     menuItem -label "Unghost All"
  195.         -annotation "Unghost All: All object(s) to be unghosted."
  196.         -image "ghostOff.xpm"         
  197.         -command "unGhostAll"
  198.         unghostAllItem;
  199.  
  200.     menuItem -divider true;
  201.     
  202.     menuItem -label "Create Motion Trail"
  203.         -annotation "Create MotionTrail: Select object(s) to generate a motion trail over time"
  204.         -command "CreateMotionTrail" 
  205.         -image "motionTrail.xpm" 
  206.         -dragMenuCommand("performMotionTrail 2")
  207.         createMotionTrailItem;
  208.     menuItem -optionBox true
  209.         -annotation "Create Motion Trail Option Box"
  210.         -label "Create Motion Trail Option Box"
  211.         -image "motionTrail.xpm"         
  212.         -command ("CreateMotionTrailOptions") 
  213.         createMotionTrailOptionItem;
  214.  
  215.     menuItem -l "Create Animation Snapshot"
  216.         -image "animateSnapshot.xpm"
  217.         -annotation "Animation Snapshot: Select animated object(s) to snapshot over time"
  218.         -c "AnimationSnapshot"
  219.         -dragMenuCommand "performSnapshot 2"
  220.         snapshotItem;
  221.         menuItem -optionBox true
  222.             -image "animateSnapshot.xpm"
  223.             -annotation "Create Animation Snapshot Option Box"
  224.             -l "Animation Snapshot Option Box"
  225.             -c "AnimationSnapshotOptions"
  226.             snapshotDialogItem;
  227.  
  228.     menuItem -label "Update Motion Trail/Snapshot"
  229.         -annotation "Update MotionTrail: Select object(s) to update their motion trail or snapshot"
  230.         -command "updateMotionTrail" 
  231.         updateMotionTrailItem;
  232.  
  233.     menuItem -divider true;
  234.  
  235.     menuItem -l "Create Animated Sweep"
  236.         -image "animateSweep.xpm"
  237.         -annotation "Create Animation Sweep: Select animated curve(s) to copy over time and then loft into a surface"
  238.         -c "AnimationSweep"
  239.         -dragMenuCommand "performAnimSweep 2"
  240.         animsweepItem;
  241.         menuItem -optionBox true
  242.             -image "animateSweep.xpm"
  243.             -annotation "Create Animation Sweep Option Box"
  244.             -l "Animation Sweep Option Box"
  245.             -c "AnimationSweepOptions" animsweepDialogItem;
  246.  
  247.     menuItem -divider true;
  248.         
  249.     menuItem -subMenu true -l "Motion Paths" 
  250.         -tearOff true
  251.         -allowOptionBoxes true
  252.         -familyImage "menuIconPaths.xpm";
  253.  
  254.         //     Set Path Key
  255.         //
  256.         menuItem -label "Set Motion Path Key" -command "SetKeyPath" 
  257.             -annotation "Set Motion Path Key: Select object to key a motion path"
  258.             -image "motionPathKey.xpm"         
  259.             setKeyPathItem;
  260.  
  261.         string $attachPathItem = `menuItem -l "Attach to Motion Path"
  262.             -c "AttachToPath"
  263.             -annotation 
  264.             "Attach to Motion Path: Select object(s) to animate along a motion path, followed by the motion path curve"
  265.             -image "motionPath.xpm"                     
  266.             -dragMenuCommand "performPathAnimation 2" attachPathItem`;
  267.             menuItem -optionBox true
  268.                 -annotation "Attach to Motion Path Option Box"
  269.                 -image "motionPath.xpm"                                     
  270.                 -l "Attach to Motion Path Option Box"
  271.                 -c "AttachToPathOptions" attachPathDialogItem;
  272.  
  273.         //     Flow Path Object
  274.         //
  275.         string $flowItem = `menuItem -l "Flow Path Object" 
  276.             -c "FlowPathObject"
  277.             -annotation 
  278.             "Flow Path Object: Select path animated object(s) to flow along a motion path"
  279.             -dragMenuCommand "performFlow 2" flowItem`;
  280.             menuItem -optionBox true 
  281.                 -annotation "Flow Path Object Option Box"
  282.                 -l "Flow Path Object Option Box"
  283.                 -c "FlowPathObjectOptions" flowDialogItem;
  284.  
  285.         setParent -m ..;
  286. }
  287.